package owg.util.editor2d.entity;

import owg.util.editor2d.Editor2D;

/**Must be implemented by all objects to be placed in {@link Editor2D}.
 * Defines basic functionality for objects that exist in a game world, including:
 * Existence, location and identification
 * */
public interface Placeable2D {


	/**
	 * Set the location of the object. 
	 * <br/><br/>
	 * This is a shorthand for {@link #setLocation(double, double, boolean)} with tentative set to false.
	 */
    public default void setLocation(double x, double y)
    {
    	setLocation(x, y, false);
    }
	/**
	 * Set the location of the object.
     * <br/><br/>
     * The operation may be "tentative", meaning that the user is transforming the object in the editor and that the scale will change in the near future.
     * The implementation may choose to omit certain calculations for tentative transformations. 
     * This will always be called with tentative set to false when the user completes or cancels the operation.
	 */
    public void setLocation(double x, double y, boolean tentative);
    public double getX();
    public double getY();
    
    public String getDefaultName();
    public String getName();
    public void setName(String newName);
    public long getID();
    
    public void render(boolean shadeless);
    
    public void destroy();
    public void revive();
    public boolean isDestroyed();
}
